import request from "@/utils/request";

// 获取企业列表
export function reqGetEnterpriseListAPI(params) {
  return request({
    url: "/park/enterprise",
    method: "get",
    params,
  });
}

// 获取行业所属列表
export const reqGetIndustryListAPI = () => request.get("/park/industry");

// 新增企业
export const reqAddNewEnterpriseAPI = (data) =>
  request.post("/park/enterprise", data);

// 查看企业详情
export const enterpriseDetailAPI = (id) =>
  request.get(`/park/enterprise/${id}`);

// 编辑企业
export const reqEditAPI = (data) => request.put("/park/enterprise", data);
// export function reqEditAPI(data){
//     return request({
//         url:'park/enterprise',
//         method:"put",
//         data
//     })
// }

// 删除企业
export const reqDelEnterpriseAPI = (id) =>
  request.delete("/park/enterprise/" + id);

// 提交/修改企业租赁合同
export const reqAddRentAPI = (data)=>request.post("/park/enterprise/rent",data)

// 展开查看企业
export const reqGetRentBuildingAPI = (id)=>request.get("/park/enterprise/rent/"+id)

// 删除租赁合同
export const reqDelRentAPI = (id)=>request.delete("/park/enterprise/rent/"+id)

// 退租
export const reqRentingOutAPI = (id) =>request.put("/park/enterprise/rent/"+id)